ustl

The 'ustl' type is a clipboard data block format for copying and pasting Unicode-encoded styled text. You can use a data block format of this type to copy and paste Unicode-encoded styled text between applications or within your application. Note that you can store styled text information in any data format of type 'ustl'. For the purposes of this document, the 'ustl' type will be described as a resource.

As shown in Figure 2-2, version 1 of the 'ustl' resource is composed of four basic elements:

Figure 2-2  Overview of a 'ustl' resource

Figure 2-3 shows the header component of a 'ustl' resource. The header contains the version and size of the 'ustl' resource as well as offsets to flattened text layout, style run, and style list data, which you can specify in any order after the header section.

Figure 2-3  Header section of a 'ustl' resource

Figure 2-4 shows the format of flattened text layout data.

Figure 2-4   Flattened text layout data

As shown in Figure 2-4, the flattened text layout data is composed of the following elements:

Each element of the text layout data array should contain the following information:

Each element of the text layout attribute data array should contain the following information:

(for each previously set text layout attribute, including line direction whether or not it has been set):

Each element of the line attribute data array should contain the following information:

(for each line):

(for each previously set line attribute):

Figure 2-5 shows the format of flattened text layout data.

Figure 2-5  Flattened style run data

As shown in Figure 2-5, flattened style run data is composed of the following elements:

Each element of the style run data array should contain the following information:

Figure 2-6 shows the format of flattened style list data.

Figure 2-6  Flattened style list data

As shown in Figure 2-6, flattened style list data is composed of the following elements:

Each element of the style run attribute, font feature, and font variation data array should contain:

(for each previously set style run attribute, and font, text size, and language, even if unset):

(for each previously set font feature):

(for each previously set font variation):

VERSION NOTES
Version 1 of this resource, described above, is available with ATSUI 1.1. Version 0, described in Apple Type Services for Unicode Imaging Reference dated May 7, 1999, is available with ATSUI 1.0. You should use version 1 of the clipboard data format.


© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)